The invention relates to a process for the preparation of compounds of formula I 
wherein:
R1 is optionally substituted alkyl,
R2 is C1-C6alkyl, C3-C6cycloalkyl, C3-C6cycloalkyl-C1-C2alkyl, aryl, aryl-C1-C2alkyl,
heterocyclyl, heterocyclyl-C1-C2alkyl, which groups are optionally substituted by alkyl,
alkoxy, or halogen; in which process
(1) an aniline of formula II, 
wherein R1 is as defined for formula I, is diazotized with an organic or inorganic nitrite or nitrous acid;
(2) the resulting diazonium salt is reacted with an oxime of formula III 
wherein R2 is as defined for formula I, in presence of a copper(II)-salt.
The compounds of formula I are intermediates for the preparation of pesticides; e.g. EP-A-460575 and WO 95/18789.
Several processes for preparing compounds of formula I are known, which, however, are not always satisfying in any respect, as number of reaction steps, yields, availability of educts, safety and ecology. For example EP-A-253213 discloses a process comprising a Grignard reaction; in EP-A-782982 a reaction with a lithium organic reagent, as butyllithium, is described.
These processes are not suitable for large scale production, as organometallic reactions have serious disadvantages with respect to economic, ecological and safety reasons. Other methods for preparation of compounds of formula I are therefore highly desirable.
Reactions of phenyl diazonium salts with oximes are known, e.g. J. Chem. Soc. 1954, p.1297-1302; Research Disclosure, October 1997, Vol. 402, 40221 and WO 98/50335. Reactions with glyoxylic acid oxime derivatives are not disclosed in these references.
Surprisingly, it has been found that compounds of formula I may be obtained directly from the corresponding anilines by reaction with a glyoxylic acid oxime derivative in yields of up to 80% and in good qualities. The method provided herewith is distinguished by ready availability of the raw materials, good technical feasibility and is economically and ecologically favorable.
An additional advantage of the reaction according to the invention is that compounds of formula I are obtained almost exclusively in form of their E-isomers with respect to the oxime double bond (E:Z greater than 95:5), which isomer is biologically more active than the Z-isomer in the corresponding final active ingredients. A separate isomerisation or isomer-purification step can therefore be avoided.
Alkyl groups are straight-chain or branched and will typically be methyl, ethyl, n-propyl, isopropyl, n-butyl, sec-butyl, isobutyl, tert-butyl, n-amyl, tert-amyl, 1-hexyl or 3-hexyl. Halogen and halo substituents are fluoro, chloro, bromo or iodo. Alkoxy is typically methoxy, ethoxy, propyloxy, isopropyloxy, n-butyloxy, isobutyloxy, sec-butyloxy and tert-butyloxy. Methoxy and ethoxy are preferred. Cycloalkyl is cyclopropyl, cyclobutyl, cyclopentyl, or cyclohexyl. Aryl is phenyl or naphthyl; phenyl is preferred. Heterocycl stands for aromatic and non-aromatic cyclic moieties with 3 to 8 ring members of which at least one is a nitrogen, oxygen or sulfur. Heterocycl typically encompasses up to three heteroatoms where preferably at least one is nitrogen. Typical examples of heterocycl are aromatic moieties like furyl, benzofuranyl, thienyl, benzothienyl, pyrrolyl, imidazolyl, pyrazolyl, oxazolyl, isoxazolyl, thiazolyl, isothiazolyl, pyridyl, pyrazinyl, pyrimidinyl, pyridazinyl, indolyl, isoindolyl, triazinyl, and the like; and non-aromatic moieties like tetrahydrofuranyl, pyrazolidinyl, pyrrolidinyl, pyrrolinyl, imidazolinydinyl, piperidinyl, pyranyl, thiopyranyl, piperazinyl, morpholinyl, thiomorpholinyl, and the like.
R1 is optionally substituted alkyl, wherein the substituents have to be inert towards the reactions; suitable substituents are for example halogen, alkoxy and phenoxy. R2 is preferably C1-C4alkyl, most preferably ethyl or methyl.
The reaction according to the invention is particularly suitable for the preparation of compounds of formula I, wherein R1 is methyl. In this case, the important intermediates of formula V.1 for the preparation of pesticides of formula VI may be prepared according to the following reaction scheme: 
This reaction sequence and parts of it are also objects of the present invention. R represents an organic radical linked via an oxygen bridge. It encompasses the designations as e.g. disclosed in EP-A-460575 and WO 95/18789, but is not limited to such examples.
Due to its relative instability, the oxime of formula III is advantageously prepared immediately before use by reaction of the corresponding glyoxylic acid ester IIIA or its hemiacetal IIIB 
with hydroxylamine or a salt thereof, as the hydrochloride, the sulfate, the phosphate or the acetate, in aqueous solution and further reacted without isolating. Compounds of formulae II, III, IIIA and IIIB are well known in the art and are partially commercially available.
The diazotation reaction is carried out in an organic solvent with an organic nitrite, e.g. an alkyl nitrite as isoamyl nitrite, or an aryl nitrite, as phenyl nitrite; or, more preferably, in aqueous solution with nitrous acid or a salt thereof, in presence of an acid. Preferred nitrites are sodium nitrite, potassium nitrite, magnesium nitrite, particularly preferred is sodium nitrite. Preferred acids are hydrochloric acid, sulfuric acid and nitrosulfuric acid; particularly preferred is sulfuric acid. Advantageous is a temperature of xe2x88x9210 to +30xc2x0 C. and a pH 0-3.
The diazonium salt is preferably reacted in the presence of a copper(II)-salt like copper acetate, CuCl2 or CuSO4 at xe2x88x9210 to +40xc2x0 C., more preferably xe2x88x9210 to +15xc2x0 C., and at pH 2-7, more preferably at pH 3-5. The amount of the copper(II)-salt is 1 to 30 mol %, more preferably 5 to 20 mol %, in relation to the aniline of formula II. The addition of a reducing agent, as a sulfite salt, e.g. sodium sulfite or potassium sulfite, may be advantageous, preferably in amounts of 1 to 20 mol %, more preferably 5 to 10 mol %, in relation to the aniline of formula II.
In a preferred mode of running the reaction step (2), an aqueous suspension of the diazonium salt is added to an aqueous solution comprising the aldoxime of formula III, the copper(II)-salt and optionally the reducing agent, maintaining a pH of 3-5 by simultaneously adding a base to the reaction mixture. It may be advantageous for working up and purification of intermediates and products to run the reaction steps (1) and (2) in presence of a hydrophobic solvent, as hydrocarbons, halogenated hydrocarbons, ethers and ketones, for example hexane, cyclohexane, methylcyclohexane, benzene, toluene, xylene, mineral oil, kerosene, methylene chloride, chloroform, ethylenechloride, chlorobenzene and dichlorobenzene.
Methylation of the oxime group is carried out for example with methyl iodide, methyl bromide, methyl chloride or dimethyl sulfate in a solvent, preferably in presence of a base.
Methods for halogenation include iodination with I2, bromination with NBS (N-bromo-succinimide) or Br2, chlorination with NCS (N-chlorsuccinimide) or Cl2 or SO2Cl2. Particularly preferred is the bromination with NBS.
Suitable solvents are halogenated hydrocarbons, typically chlorobenzene, bromobenzene, chloroform, dichloromethane, trichloromethane, dichloroethane or trichloroethane; ethers, typically diethyl ether, tert-butylmethyl ether, glyme, diglyme, tetrahydrofuran or dioxane, as well as nitrogen containing compounds like triethylamine, piperidine, pyridine, alkylated pyridine, quinoline and isoquinoline.
The compound of formula V may be reacted with a compound of the formula HOR, wherein R is an organic radical, under basic conditions in a solvent according to known methods, to obtain the active ingredients of formula VI, which may, if desired, be transesterified or amidated according to generally known methods.